home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3488 / macros / amixtbm.aim < prev    next >
Text File  |  1991-01-13  |  2KB  |  48 lines

  1. * Benchmark "amixtbm": a mixture of binary, grey-value and
  2. * display operations, using the images "trui" and "cermet"
  3. * (loading the images should not be included in the timing).
  4. * The display is switched "on" and "off", showing the result
  5. * of the operations when necessary.
  6. don
  7. read trui A          * Image "trui" in A and
  8. read cermet B        * "cermet" in B,
  9. clear C              * clear windows C
  10. clear D              * and D.
  11. * start here the benchmark timing!
  12. * some binary/morphologic operations upon "cermet"
  13. doff
  14. thr B B 1            * threshold
  15. don
  16. inv 1 B              * invert bitplane
  17. doff
  18. bcopy 1 1 B C
  19. propag 255 2 1 8 1 C * propagate the edge in bitplane 2
  20. don
  21. exor 1,2,1,C         * remove objects connected to the edge
  22. doff
  23. bcopy 1 2 C C        * make a mask bitplane
  24. ero 3 1 6 0 C        * remove small objects
  25. don
  26. propag 100 1 2 6 0 C * propagate remaining objects
  27. label C D 1 8        * "label" the objects
  28. * some grey-value operations upon "trui"
  29. don 2                * contrast stretching active
  30. gdisp A              * redisplay trui
  31. gradx A B            * horizontal gradient image
  32. grady A C            * vertical gradient image
  33. lapl A D             * enhance the image
  34. doff
  35. * max/min/arithmetic grey-value operations upon "trui"
  36. lmax A B 7           * maximum
  37. lmin A C 7           * minimum
  38. lmin B D 7           * lohull
  39. add C B              * dynamic threshold, low freq
  40. lmax C C 7           * uphull
  41. add C D              * midian
  42. sub A D 127          * orig-midian, hf non-edges
  43. don 2                * contrast stretching active
  44. copy D C
  45. mul A C              * "mix" with original
  46. don                  * back to default display mode.
  47.  
  48.